<template>
  <div>
    <el-header style="text-align: right; font-size: 12px">
      <span>用户</span>
      <span>教学</span>
      <span>题库</span>
      <span>运营</span>
      <span>营销</span>
      <span>商品</span>
      <span>财务</span>
      <span>统计</span>
      <span>更新</span>
      <input class="dw" type="checkbox" />
    </el-header>
    <el-container style="height: 500px; border: 1px solid #eee">
      <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
        <el-menu :default-openeds="['1', '3']">
          <!-- <el-submenu index="1"> -->
          <!-- <el-menu-item-group> -->
          <el-menu-item index="1-1">学院管理</el-menu-item>
          <el-menu-item index="1-2">讲师管理</el-menu-item>
          <el-menu-item index="1-3">主教管理</el-menu-item>
          <!-- </el-menu-item-group> -->
          <!-- </el-submenu> -->
        </el-menu>
      </el-aside>

      <el-container>
        <el-main>
          <p class="xueyuan">学员管理</p>
          <el-form :inline="true" :model="formInline" class="demo-form-inline">
            <el-form-item label="学生状态">
              <el-select v-model="formInline.region" placeholder="请选择">
                <el-option label="启用" value="shanghai"></el-option>
                <el-option label="禁用" value="beijing"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="学院名称">
              <el-input
                v-model="formInline.user"
                placeholder="请输入学院关键词"
              ></el-input>
            </el-form-item>
            <el-form-item label="手机号">
              <el-input
                v-model="formInline.user1"
                placeholder="请输入手机号"
              ></el-input>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" @click="onSubmit">查询</el-button>
            </el-form-item>
          </el-form>
          <el-table :data="tableData">
            <el-table-column prop="checked" label="" width="80">
              <input class="input" type="checkbox" />
            </el-table-column>
            <el-table-column prop="date" label="学生名称" width="260">
            </el-table-column>
            <el-table-column prop="name" label="手机号" width="260">
            </el-table-column>
            <el-table-column prop="address" label="状态" width="160">
            </el-table-column>
            <el-table-column prop="chuangjian" label="创建时间" width="200">
            </el-table-column>
            <el-table-column
              prop="chaozuo"
              label="操作"
              width="300"
            ></el-table-column>
          </el-table>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<style scoped>
.el-button--primary span {
  float: right !important;
  width: 60px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  box-sizing: border-box;
  background: #3799fe;
  border-radius: 6px;
}
.el-form {
  width: 100%;
  height: 100px;
  box-sizing: border-box;
  padding-top: 40px;
  padding-left: 30px;
}
main {
  position: relative;
}
.dw {
  position: absolute;
  left: 240px;
  top: 224px;
  z-index: 9999999999;
  width: 16px;
  height: 16px;
}
td {
  text-align: center;
}
.el-table td.el-table__cell div {
  text-align: center;
}
.el-aside {
  height: 100%;
}
.el-menu {
  height: 100%;
}
.el-container {
  height: 700px;
}
.el-table .el-table__cell {
  text-align: center !important;
}
.el-table_1_column_1 {
  display: flex !important;
  align-items: center !important;
  width: 80px !important;
}
.cell {
  width: 80px !important;
  text-align: center !important;
}
.input {
  margin-left: 20px !important;
  width: 16px;
  height: 16px;
}
.xueyuan {
  width: 100%;
  height: 40px;
  line-height: 40px;
  padding-left: 40px;
  box-sizing: border-box;
  font-weight: 500;
  border-bottom: 1px solid #ebeef5;
}
.el-header span {
  float: left;
  color: #fff;
  width: 60px;
  text-align: center;
}
.el-header {
  text-align: left !important;
  /* padding-left: 40px; */
  box-sizing: border-box;
  background: linear-gradient(to right, #2945cb, #3799fe);
  padding-left: 220px;
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}
.el-header {
  background-color: #b3c0d1;
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}
</style>
<script>
import Vue from "vue";
import { yuangong } from "../../api/index.js";
import {
  Pagination,
  Dialog,
  Autocomplete,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Menu,
  Submenu,
  MenuItem,
  MenuItemGroup,
  Input,
  InputNumber,
  Radio,
  RadioGroup,
  RadioButton,
  Checkbox,
  CheckboxButton,
  CheckboxGroup,
  Switch,
  Select,
  Option,
  OptionGroup,
  Button,
  ButtonGroup,
  Table,
  TableColumn,
  DatePicker,
  TimeSelect,
  TimePicker,
  Popover,
  Tooltip,
  Breadcrumb,
  BreadcrumbItem,
  Form,
  FormItem,
  Tabs,
  TabPane,
  Tag,
  Tree,
  Alert,
  Slider,
  Icon,
  Row,
  Col,
  Upload,
  Progress,
  Spinner,
  Badge,
  Card,
  Rate,
  Steps,
  Step,
  Carousel,
  CarouselItem,
  Collapse,
  CollapseItem,
  Cascader,
  ColorPicker,
  Transfer,
  Container,
  Header,
  Aside,
  Main,
  Footer,
  Timeline,
  TimelineItem,
  Link,
  Divider,
  Image,
  Calendar,
  Backtop,
  PageHeader,
  CascaderPanel,
  Loading,
  MessageBox,
  Message,
  Notification,
} from "element-ui";
Vue.use(Pagination);
Vue.use(Dialog);
Vue.use(Autocomplete);
Vue.use(Dropdown);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Menu);
Vue.use(Submenu);
Vue.use(MenuItem);
Vue.use(MenuItemGroup);
Vue.use(Input);
Vue.use(InputNumber);
Vue.use(Radio);
Vue.use(RadioGroup);
Vue.use(RadioButton);
Vue.use(Checkbox);
Vue.use(CheckboxButton);
Vue.use(CheckboxGroup);
Vue.use(Switch);
Vue.use(Select);
Vue.use(Option);
Vue.use(OptionGroup);
Vue.use(Button);
Vue.use(ButtonGroup);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(DatePicker);
Vue.use(TimeSelect);
Vue.use(TimePicker);
Vue.use(Popover);
Vue.use(Tooltip);
Vue.use(Breadcrumb);
Vue.use(BreadcrumbItem);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Tabs);
Vue.use(TabPane);
Vue.use(Tag);
Vue.use(Tree);
Vue.use(Alert);
Vue.use(Slider);
Vue.use(Icon);
Vue.use(Row);
Vue.use(Col);
Vue.use(Upload);
Vue.use(Progress);
Vue.use(Spinner);
Vue.use(Badge);
Vue.use(Card);
Vue.use(Rate);
Vue.use(Steps);
Vue.use(Step);
Vue.use(Carousel);
Vue.use(CarouselItem);
Vue.use(Collapse);
Vue.use(CollapseItem);
Vue.use(Cascader);
Vue.use(ColorPicker);
Vue.use(Transfer);
Vue.use(Container);
Vue.use(Header);
Vue.use(Aside);
Vue.use(Main);
Vue.use(Footer);
Vue.use(Timeline);
Vue.use(TimelineItem);
Vue.use(Link);
Vue.use(Divider);
Vue.use(Image);
Vue.use(Calendar);
Vue.use(Backtop);
Vue.use(PageHeader);
Vue.use(CascaderPanel);
Vue.use(Loading.directive);
Vue.prototype.$loading = Loading.service;
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$notify = Notification;
Vue.prototype.$message = Message;
// new Vue().$mount("#app");
export default {
  data() {
    const item = {
      date: "136****2458",
      name: "13645242458",
      address: "启用",
      chuangjian: "2021/09/05 15:35:36",
      chaozuo: "详情-编辑-禁用-删除-重置密码",
      checked: "checkbox",
    };
    return {
      tableData: Array(20).fill(item),
      activeName: "second",
      formInline: {
        user: "",
        user1: "",
        user2: "",
        region: "",
      },
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    onSubmit() {
      console.log(this.formInline.user);
    },
  },
  async mounted() {
    // localStorage.token =
    //   "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vMTIwLjUzLjMxLjEwMzo4NC9hcGkvYWRtaW5Vc2VyL2xvZ2luIiwiaWF0IjoxNjMxNzc5MjU3LCJleHAiOjE2MzIwODE2NTcsIm5iZiI6MTYzMTc3OTI1NywianRpIjoiY0RHb0ZqSUYxWUJ5SldIVyIsInN1YiI6MSwicHJ2IjoiZTUzODQyOTgzNDYyYmQ4OTUyYWU1OTIzNjM3YWNhMGU5NmIyNTk4YyJ9.2zmwaGlVdWuEBlXuxPUqUdKlp3iUHnqeIJ4eiWxrAS0";
    this.axios({
      methods: "get",
      url: "http://120.53.31.103:84/api/user?page=1&limit=10&status=&nickname=&mobile=&",
      headers: {
        Authorization:
          "Bearer " +
          "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vMTIwLjUzLjMxLjEwMzo4NC9hcGkvYWRtaW5Vc2VyL2xvZ2luIiwiaWF0IjoxNjMyMjc0NDc3LCJleHAiOjE2MzI1NzY4NzcsIm5iZiI6MTYzMjI3NDQ3NywianRpIjoiV3M0TWJVUFhQclhxNW1oYiIsInN1YiI6MSwicHJ2IjoiZTUzODQyOTgzNDYyYmQ4OTUyYWU1OTIzNjM3YWNhMGU5NmIyNTk4YyJ9.jJ1B8XttTlgxEgFqiZtbKIStrG-T_7q6LuSBH9jE090",
      },
    }).then((res) => {
      console.log(res);
    });

    // var regg = await yuangong();
    // console.log(regg);
  },
};
</script>
